<template>
  <div class="container">
    <Header></Header>
     <!-- 中间LOGO -->
     <div class="centerLogo">
      <van-image
        width="134"
        height="45"
        src="//yanxuan.nosdn.127.net/static-union/164793255107785e.png"
      />
     </div>

    <!-- 表单 -->
    <div class="fromBox">
      <van-form >
        <van-cell-group inset>
          <van-field
            name="邮箱账号"
            placeholder="邮箱账号"
            clearable
          />

          <van-field
            name="密码"
            placeholder="密码"
            clearable
          />
          
        </van-cell-group>

        <div class="codeLoginBox">
          <van-button @click="toRegister" class="toCodeLogin" type="default">注册账号</van-button>
          <van-button class="toCodeLogin" type="default">忘记密码</van-button>
        </div>

        <div style="margin:50px 16px 0;">
          <van-button block type="danger" native-type="submit">
            登录
          </van-button>
        </div>

      </van-form>
    </div>

    <!-- 其他方式登录 -->
    <div @click="toLogin" class="footer">
      其他登录方式<van-icon name="arrow" />
    </div>

  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';


const router = useRouter()

const toLogin = () => {
  router.push('/login')
}

const toRegister = () => {
  router.push('/register')
}

</script>

<script lang="ts">
export default {
  name: 'email'
}
</script>

<style lang="scss" scoped>
.container{
  .header{ 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; 
    height: 44px;
    font-size: 30px;
    border-bottom: 1px solid #ddd;
    .headerLogo{
      width:86px;
      height:30px;
    }
    .search{
      width:74px;
      height: 32px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
  .centerLogo{
    text-align:center;
    margin:28px 0;
  }
  .fromBox{
    padding: 0 5px;
    .codeLoginBox{
      display:flex;
      justify-content:space-between;
      align-items:center;
      margin-top:20px;
      .text{
        font-size:14px;
        margin-left:20px;
        color:#888;
      }
      .toCodeLogin{
        border:none;
        margin-right:5px;
      }
    }
    .checkBox{
      display:flex;
      align-items: flex-start;
      padding:0 16px;
      .agreement{
        font-size:14px;
        margin-left:10px;
        & a{
          color:#409EFF;
        }
      }
    }
    .van-cell{
      padding:15px 0;
      border-bottom: 1px solid #ddd;
      width:100%;
    }
  }
  .footer{
    font-size: 15px;
    display: flex;
    justify-content: center;
    margin-top: 80px;
  }
}

</style>
